/*
 * Write a C++ program to display
 * multiplication table
 */

# include <iostream>
using namespace std;

class MultiplicationTable {
  int number, limit;
public:
  void get();
  void display();
};

void MultiplicationTable::get() {
  cout << "Enter the number: ";
  cin >> number;
  cout << "Enter the maximum number of rows: ";
  cin >> limit;
}

void MultiplicationTable::display() {
  int i = 0;
  for(i = 0; i < limit; i++) {
    cout << i+1 << " X " << number << " = " << (i+1)*number << endl;
  }
}

int main() {
  MultiplicationTable mt;
  mt.get();
  mt.display();
}
